<script setup lang="ts">
import { request } from "@/utils/http";
import { getCodeApi } from '@/apis/user'
import { userCounterStore } from '@/stores/counter'
// 1.测试网络请求
const testReq = async () => {
  const res = await request.post('/login/password', { mobile: '13230000031', password: 'abc12345' })
  console.log(res.data);
}
const testReq2 = async() => {
const res =  await getCodeApi({ mobile: '13230000031', type: 'login' })
console.log(res.code)
}

const store = userCounterStore()
</script>

<template>
  <view class="test-page">
    <button disabled class="uni-button">点我吧</button>
    <text class="iconfont icon-edit"></text>
    <view class="uniui-icon-symbol-tool-03" style="width: 50px;height:50px"></view>
    <button class="uni-button" @click="testReq">测试请求</button>
    <button class="uni-button" @click="testReq2">测试请求2</button>
    <view>仓库数据1：{{ store.count }}</view>
    <view>仓库数据2: {{ store.doubleCount }}</view>
    <button class="uni-button" @click="store.increment">加1</button>
    <button class="uni-button" @click="store.decrement">减1</button>
  </view>
</template>

<style lang="css" scoped>
button:after {
  display: none;
}

.uni-button {
  height: 88rpx;
  text-align: center;
  line-height: 88rpx;
  border-radius: 88rpx;
  color: #fff;
  font-size: 32rpx;
  background-color: #20c6b2;

  &[disabled],
  &.disabled {
    color: #fff !important;
    background-color: #ace8e0 !important;
  }
}
</style>
